﻿<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="@Url.Content("~/Content/css/base.css")" type="text/css"/>
    <link rel="stylesheet" href="@Url.Content("~/Content/css/common.css")" type="text/css"/>
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    @*    <script src="@Url.Content("~/Scripts/jquery-1.5.1.js")" type="text/javascript"></script>*@
    <link href="../../Content/css/page_zlb_c_e_d.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="template_logo w">
        <div style="width: 939px; margin: auto;">
              <div class="messagewarn fr">
                <div class="messagewarn_1 mr5 fl">
                    <div class="messagewarn_1_pic fl">
                    </div>
                    <a href="javascript:void(0)" onclick="message_a()">消息 </a>
                </div>
                <div class="messagewarn_2 fr">
                    <div class="messagewarn_2_pic fl">
                    </div>
                    <a href="../../Home/Login">退出 </a>
                </div>
                <div class="cb">
                </div>
            </div>
            <div class="template_logo_1 fl">
            </div>
            <span class="template_logo_span f14">金钱豹汽车管理系统 </span>

            <div class="cb">
            </div>
        </div>
    </div>
    <div class="messagewarn_content">
        <div class="messagewarn_content_text">
        </div>
    </div>
    <div class="template bc">
        <div id="gap" style="height: 53px;">
        </div>
        @RenderBody()
        @*         @Html.Partial("_Partviewdrivernav")
        <div class="content bc">
            <div class="content_link_warn f12">
                你当前的位置：司机管理&gt&gt &nbsp;&nbsp;司机查询&gt&gt &nbsp;&nbsp;所有司机列表
            </div>
            <div class="content_right fr" id="rightcontent">
                @RenderBody()
            </div>
            @Html.Partial("_Partviewdriverleftbar")

            <div class="content_contract fl">
                <a href="javascript:void(0)" class="btn_contract w8h32" id="contract" title="收缩"></a>
                <a href="javascript:void(0)" class="btn_expand w8h32" id="expand" title="展开"></a>
            </div>
            <div class="cb">
            </div>
        </div>*@
        <div class="foot bc">
        </div>
    </div>
    <script type="text/javascript" language="javascript">
        $(function () {
            $("#driver_cx").click(function () {
                $("#driver_cx_content").toggle();

            });
            $("#driver_create").click(function () {
                $("#driver_create_content").toggle();
            });
            $(".btn").hover(function () {
                var this_a = $(this).children("a");
                this_a.removeClass('nav_driver_btn1');
                this_a.addClass('nav_driver_btn2');
                $(this).siblings().children("a").removeClass('nav_driver_btn2').addClass('nav_driver_btn1');
            }, function () {
                var this_a1 = $(this).children("a");
                this_a1.removeClass('nav_driver_btn2');
                this_a1.addClass('nav_driver_btn1');
            })
            //点击收缩
            $("#contract").click(function () {
                $("#leftwrap").slideUp(500);
                $('#leftbar').animate({ width: "0" }, 500, function () { $('#contract').hide(); });
                $('#rightcontent').animate({ width: "931px" }, 500, function () { $("#expand").css("display", "inline-block"); });
            });
            //点击展开
            $("#expand").click(function () {
                $('#rightcontent').animate({ width: "779px" }, 450, function () { $("#expand").hide(); });
                $("#leftwrap").slideDown(500);
                $('#leftbar').animate({ width: "152px" }, 500, function () { $("#contract").show();  });
            });

        })

        $.post("/Message/CountNewMessage", function (ret) {
            if (ret > 0) {
                $(".messagewarn_content").show(1000);
                var messagewarn = "你有" + ret + "新消息，请查看";
                $(".messagewarn_content_text").append(messagewarn);
            }
            else {
                $(".messagewarn_content").hide();
            }

        });
        function message_a() {
            $.post("/Home/UserSummInfo", {}, function (ret) {

                if (ret.UserRole == "管理员") {
                    window.location.href = "../../Message/Index";
                }
                else if (ret.UserRole == "申请人") {

                    window.location.href = "../../Message/ApplicantMessage";
                }
                else if (ret.UserRole == "负责人") {
                    window.location.href = "../../Message/DriverManageMessage";
                }
                else if (ret.UserRole == "财务人员") {
                    window.location.href = "../../Message/FinanManMessage";
                }
                else {
                    alert("请先登入！");
                    window.location.href = "../../Home/Login";
                }
            }, "json");

        }

    </script>


</body>
</html>
